package com.ssy.lingxi.member.merchant.model.vo.maintenance.request;

import com.ssy.lingxi.member.merchant.handler.annotation.CurrencyTypeAnnotation;
import com.ssy.lingxi.member.merchant.handler.annotation.MemberClassifyCodeAnnotation;
import com.ssy.lingxi.member.merchant.handler.annotation.MemberPartnerTypeAnnotation;
import com.ssy.lingxi.member.merchant.model.vo.basic.request.AreaCodeVO;
import com.ssy.lingxi.member.merchant.model.vo.validate.request.BusinessCategoryVO;
import com.ssy.lingxi.member.merchant.model.vo.validate.request.ValidateIdVO;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.Valid;
import javax.validation.constraints.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * 会员维护 - 会员详情 - 会员档案 - 修改入库资料接口参数
 * @author 万宁
 * @version 2.0.0
 * @date 2021-07-06
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class MemberMaintenanceClassificationUpdateVO extends ValidateIdVO implements Serializable {
    private static final long serialVersionUID = 6064508589087377157L;

    /**
     * 会员编码
     */
    @MemberClassifyCodeAnnotation
    private String code;

    /**
     * 合作关系类型枚举
     */
    @MemberPartnerTypeAnnotation
    private Integer partnerType;

    /**
     * 单次合作金额
     */
    @NotNull(message = "合作金额不能为空")
    @PositiveOrZero(message = "合作金额要大于等于0")
    @Max(value = 1000000000, message = "单次合作金额不能超过10的9次方")
    private BigDecimal maxAmount;

    /**
     * 适用区域编码列表
     */
    @Valid
    private List<AreaCodeVO> areaCodes;

    /**
     * 主营品类列表
     */
    @NotEmpty(message = "请选择主营品类")
    @Valid
    private List<BusinessCategoryVO> categories;

    /**
     * 币别枚举
     * 1: CNY-人民币
     * 2: USD-美元
     * 3: JPY-日元
     * 4: EUR-欧元
     */
    @CurrencyTypeAnnotation
    private Integer currencyType;

    /**
     * 备注
     */
    @Size(max = 200, message = "备注最长200个字符")
    private String remark;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public Integer getPartnerType() {
        return partnerType;
    }

    public void setPartnerType(Integer partnerType) {
        this.partnerType = partnerType;
    }

    public BigDecimal getMaxAmount() {
        return maxAmount;
    }

    public void setMaxAmount(BigDecimal maxAmount) {
        this.maxAmount = maxAmount;
    }

    public List<AreaCodeVO> getAreaCodes() {
        return areaCodes;
    }

    public void setAreaCodes(List<AreaCodeVO> areaCodes) {
        this.areaCodes = areaCodes;
    }

    public List<BusinessCategoryVO> getCategories() {
        return categories;
    }

    public void setCategories(List<BusinessCategoryVO> categories) {
        this.categories = categories;
    }
}
